package server;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;
import modelo.SistemaCasaCentral;

public class Servidor {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new Servidor();

	}

	public Servidor() {

		try {
			LocateRegistry.createRegistry(1099);
			SistemaCasaCentral gestionNegocio = SistemaCasaCentral
					.getInstancia();
			Naming.rebind("//127.0.0.1/InterfaceNegocio", gestionNegocio);
			System.out.println("Fijado en //127.0.0.1/GestionNegocio");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
